package md

import (
	"os/exec"
)

func getDefaultIP() string {
	cmd := exec.Command("bash", "-c", "ifconfig `route -n get default | grep interface | awk '{print $2}'` | grep inet -w | awk '{print $2}'")
	output, err := cmd.Output()
	if err == nil {
		return string(output)
	}
	return ""
}
